var um = UM.getEditor('post',{
	autoHeight:true
});
$("#post_submit").on('click',function(e){
	var message = [];
	var title = $.trim($("input[name=title]").val());
	if(title.length == 0){
		message.push('标题不能为空')
	}else
	if(title.length < 10){
		message.push('标题不能少于10个字');
	}else
	if(title.length > 50){
		message.push('标题不能超过50个字');
	}
	var post = um.getContent();
	var posttxt = $.trim(um.getContentTxt());
	if(posttxt.length == 0){
		message.push('博客内容不能为空');
	}else
	if(posttxt.length < 15){
		message.push('博客内容不能少于15字');
	}
	if(message.length != 0){
		alert(message.join('\n'))
		return false;
	}
	$("#post_form").submit();
})